package com.rizzo.android.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import com.rizzo.android.content.RizzoSyncAdapter;

public class RizzoSyncService extends Service {

	private static final Object syncAdapterLock = new Object();
	private static RizzoSyncAdapter rizzoSyncAdapter;

	@Override
	public void onCreate() {
		synchronized (syncAdapterLock) {
			if (rizzoSyncAdapter == null) {
				rizzoSyncAdapter = new RizzoSyncAdapter(getApplicationContext(), true);
			}
		}
	}

	@Override
	public IBinder onBind(Intent intent) {
		return rizzoSyncAdapter.getSyncAdapterBinder();
	}
}
